import { createSlice } from "@reduxjs/toolkit";
const counterSlice = createSlice({
  name: "counter",
  initialState: {
    usename: [],
    token: "",
  },
  reducers: {
    useLogin: (action, state) => {
      (action.usename = state.payload.usename),
        (action.token = state.payload.token);
    },
  },
});
export const { useLogin } = counterSlice.actions;

export default counterSlice.reducer;
